package com.xlongwei.info.model;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.LinkedList;
import java.util.List;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.xlongwei.info.util.DtDeserializer;
import com.xlongwei.info.util.DtSerializer;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Info implements Serializable {
	private static final long serialVersionUID = -5869466539813295151L;
	private String user;
	private String from, to;
	private boolean owner;
	private String note;
	@JsonSerialize(using = DtSerializer.class)
	@JsonDeserialize(using = DtDeserializer.class)
	private LocalDateTime start;
	@JsonSerialize(using = DtSerializer.class)
	@JsonDeserialize(using = DtDeserializer.class)
	private LocalDateTime end;
	private final List<String> acceptors = new LinkedList<>();
}
